﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace XMK.Tadong.Web.TJ
{
    public class SysHelper
    {

        public SysHelper()
        {
        }
        /// <summary>
        /// 提示信息
        /// </summary>
        /// <param name="strMessage">提示用户</param>
        public static void NotifyUser(System.Web.UI.Page curPage, string strMessage)
        {
            curPage.Response.Write("<script>window.alert('" + strMessage + "')</script>");
        }
        /// <summary>
        /// 关闭当前窗体
        /// </summary>
        public static void CloseWin(System.Web.UI.Page curPage)
        {
            curPage.Response.Write("<script>window.opener=null;window.close();</script>");
        }
        /// <summary>
        /// 关闭当前窗体
        /// </summary>
        public static void CloseWin(System.Web.HttpResponse hpRes)
        {
            hpRes.Write("<script>window.opener=null;window.close();</script>");
        }

        public static void GoBackHistory(System.Web.UI.Page curPage)
        {
            curPage.Response.Write("<script>history.back();</script>");
        }
    }
}